import antfu from '@antfu/eslint-config';

export default antfu(
  {
    unocss: true,
  },
  {
    ignores: ['uni_modules'],
  },
  {
    files: ['**/*.vue'],
    rules: {
      'vue/block-order': [
        'error',
        {
          order: ['template', 'script', 'style'],
        },
      ],
    },
  },
  {
    rules: {
      'comma-dangle': ['error', 'only-multiline'],
      'no-console': 'off',
      'style/semi': ['error', 'always'],
      'padded-blocks': ['error', 'never'],
      'antfu/top-level-function': 'off',
      'node/prefer-global/process': 'off',
      'regexp/no-unused-capturing-group': 'off',
      'curly': 'off',
      'style/member-delimiter-style': ['error', {
        multiline: {
          delimiter: 'semi',
          requireLast: true,
        },
        singleline: {
          delimiter: 'semi',
          requireLast: false,
        },
        multilineDetection: 'brackets',
      }],
    },
  },
);
